<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>退款管理</title>
    	[#include "common/include.ftl"]
		[#import "/common/pagination.ftl" as p/]
    	<link rel="styleSheet" href="${base}/resource/css/member.css">
    	<script type="text/javascript">
    		$(function(){
    			$("#state").val("${refundState!}");
    			$("#date").val("${type!}");
    			$(".hp-button").click(function(){
    				var orderNo = $("#orderNo").val();
    				if(orderNo && orderNo != ''){
    					window.location = base + '/refund/list.jhtml?orderNo=' + orderNo;
    				}
    			});
    		});
    		
    		function change(){
    			window.location = base + '/refund/list.jhtml?refundStatus=' + $("#state").val() + '&type=' + $("#date").val();
    		}
    	</script>
	</head>
	<body class="customer">
   		[#include "common/header.ftl"]
		<div class="crumbs">
	        <a href="${base}/member/index.jhtml">会员中心</a>
			<i style='font-family: simsun;font-style: normal;'>></i>
			<a>交易管理</a>
			<i style='font-family: simsun;font-style: normal;'>></i>
			<a>退换货管理</a>
		</div>
		<div id="member-main">
			[#assign menuNo = 'refund'/]
	        [#include "/common/member-left.ftl"/]
			<div class="member-right">
				<div class="right-wrap">
					<h2 class="right-title">退换货记录</h2>
					<div class="member-order">
						<div class="list-header">
							<div class="order-search fr">
								<div class="has-clean fl">
									<input type="text" placeholder="订单查询" class="hp-input" id="orderNo"/>
									<i class="clean">x</i>
								</div><a class="hp-button fl">查询</a>
								<div class="clear"></div>
							</div>
						</div>
						<div class="clear"></div>
						<table class="member-table-list record-table-list">
							<tr>
								<th width="15%">退款编号</th>
								<th width="15%">订单编号</th>
								<th width="25%">商品名称</th>
								<th width="20%">
								<select id="date" onchange="change()">
									<option value="0">最近一个月</option>
									<option value="1">一个月以前</option>
								</select></th>
								<th width="15%">
									<select id="state" onchange="change()">
										<option value="">全部状态</option>
										<option value="0">提交申请</option>
										<option value="1">买家退货</option>
										<option value="2">售后确认</option>
										<option value="3">卖家发货</option>
										<option value="4">退换货成功</option>
										<option value="5">退换货失败</option>
									</select>
								</th>
								<th>操作</th>
							</tr>
							[#if pager?? && pager.list?has_content]
								[#list pager.list as item]
									<tr class="p-l">
										<td>${item.refundNo}</td>
										<td>${item.orderNo}</td>
										<td class="align-left"><a href="${item.goodsPath}">${item.productName}</a></td>
										<td>${item.createDate}</td>
										<td>${item.refundStatus}</td>
										<td><a href="${base}/refund/detail/${item.refundNo}.jhtml">查看</a></td>
									</tr>
								[/#list]
							[#else]
								<tr>
									<td colspan="6" class="list-empty">暂无订单</td>
								</tr>
							[/#if]
							<tr>
								<td colspan="6">
						    		[@p.pager pager = pager url = "${base}/refund/list.jhtml"/]
								</td>
							</tr>
						</table>
					</div>
				</div>
			</div>
			<div class="clear"></div>
		</div>
		[#include "common/footer-slidebar-lazyload.ftl"]
	</body>
</html>